package projectEuler;

public class Problem_07 {

        public static void main(String[] args) {
                int slider = 6;
                int array[] = new int[10001];
                array[0] = 2; array[1] = 3;
                array[2] = 5; array[3] = 7;
                array[4] = 11; array[5] = 13;
                int number = 14;
                do{
                        for(int otherNumber = 2; otherNumber<number; otherNumber++){
                                if(number%otherNumber == 0){
                                        otherNumber = 2;
                                        number++;
                                }
                        }
                        array[slider] = number;
                        slider++;
                        number++;
                }while(slider < 10001);
                System.out.println(array[10000]);
        }

}